package day3;

import java.io.*;

//测试字符流 + 缓冲流
public class TestChar {
    public static void main(String[] args) {
        try (FileReader fr = new FileReader("d://io//target.txt");
             FileWriter fw = new FileWriter("d://io//newTarget.txt");
             BufferedReader br = new BufferedReader(fr);
             BufferedWriter bw = new BufferedWriter(fw)) {
            String msg = "";
            while ((msg = br.readLine()) != null) {
                bw.write(msg);
                bw.newLine();   //换行
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
